#include <stdio.h>
#include <math.h>

int main(void) {
    int n = 0;
    scanf("%d", &n);
    for(int i = 0; i < n; i++) {
        double n, m;
        scanf("%lf %lf", &n, &m);
        double average = (n + m) * 0.5;
        if (n > average) {
            printf("Bob %g\n", n - average);
        } else if (n < average) {
            printf("Alice %g\n", m - average);
        } else {
            printf("None\n");
        }
    }
    return 0;
}
